﻿namespace PugLib.UnitTest
{
	using System;

	using Microsoft.VisualStudio.TestTools.UnitTesting;

	/// <summary>
	///This is a test class for FunctionFactoryTest and is intended
	///to contain all FunctionFactoryTest Unit Tests
	///</summary>
	[TestClass]
	public class FunctionFactoryTest
	{
		[TestMethod]
		public void CreateFuncTest()
		{
			const String functionToCall = "Insert";
			Func<String, Int32, String, String> insertFunc = FunctionFactory.CreateFunc<Func<String, Int32, String, String>>(typeof(String), functionToCall);
			const String myString = "123";
			String result = insertFunc(myString, 1, "456");
			Assert.AreEqual("145623", result);
		}
	}
}